package com.lixy.demo.spring4_highlight.ch2.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class DemoPublisher {

	public void publish( String msg ) {
		this.context.publishEvent( new DemoEvent( this, msg ) );
	}
	
	@Autowired
	private ApplicationContext context;
}
